package healththink

import grails.test.mixin.*
import org.junit.*

/**
 * See the API for {@link grails.test.mixin.domain.DomainClassUnitTestMixin} for usage instructions
 */
@TestFor(FacilitySvc)
class FacilitySvcTests {
	
	@Test
    void testFacilitySvc() {
		FacilitySvc target = HealthThink.getStaticFacilitySvc()
		   
		assertNotNull("(error)FacilitySvc Target Null", target)
		assertNotNull("(error)FacilitySvc Validation Was Not Successfull", target.validate())
		   
		target.validate()
		assertFalse("(error) FacilitySvcs Has Errors", target.hasErrors())
		target = target.save(flush:true)
		FacilitySvc expected = FacilitySvc.findById(target.id)
		
		assertNotNull("(error)FacilitySvc Target was not saved", target)
		assertNotNull("(error)Expected FacilitySvc was null", expected)
		assertEquals("(error)Target and Expected are not Equal", target, expected)
		   
		target.delete(flush:true)
    }	
}
